﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using FreeSql.DataAnnotations;
using Newtonsoft.Json;

namespace Bzzb.Model
{
    [Table(Name = "oplog")]
    public class OpLog
    {
        [Column(IsIdentity = true, IsPrimary = true, Name = "id")]
        [JsonProperty("id")]
        public long Id { get; set; }

        [Column(Name = "message")]
        [JsonProperty("message")]
        public string Message { get; set; }

        [Column(Name = "created", ServerTime = DateTimeKind.Local, CanUpdate = false, DbType = "datetime(0)")]
        [JsonProperty("created")]
        public DateTime Created { get; set; }

        [Column(Name= "updated", ServerTime = DateTimeKind.Local, DbType = "datetime(0)")]
        [JsonProperty("updated")]
        public DateTime Updated { get; set; }
    }
}
